NetworkChanged

An event indicating a change in the current network connection.

The event is triggered whenever a change affects the route network packets take to any network server.

For example, the event is triggered when:

  • A network connection becomes available or going away;
  • A VPN tunnel is established or taken down;
  • An active network connection's IP address changes.

Since

7.17

Functions

Link copied to clipboard
Returns the connection type of the network at the time of the event.
Link copied to clipboard
open fun network(): Network
Returns the Network instance initiated this event.